home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / extensions / spec / video_sync.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  3.7 KB  |  131 lines

  1. XXX - Not complete yet!!!
  2.  
  3. Name
  4.  
  5.     SGI_video_sync
  6.  
  7. Name Strings
  8.  
  9.     GLX_SGI_video_sync
  10.  
  11. Version
  12.  
  13.     $Date: 1995/09/30 02:33:38 $ $Revision: 1.1 $
  14.  
  15. Number
  16.  
  17.     41
  18.  
  19. Dependencies
  20.  
  21.     None
  22.  
  23. Overview
  24.  
  25.     This extension provides a means for synchronization with the video
  26.     frame rate of a monitor (in the case of an interlaced monitor, the
  27.     synchronization is actually with the field rate instead).  Typically a
  28.     vertical retrace triggers the display of a video frame.  The kernel
  29.     maintains a video sync counter for each physical hardware pipe in a
  30.     system; the counter is incremented upon each vertical retrace.  An
  31.     OpenGL context always corresponds to a pipe.  When an OpenGL process
  32.     has a current context, it can put itself to sleep until the counter of
  33.     that pipe reaches a desired value.  The process can also query the
  34.     value of the counter.
  35.  
  36.     The counter runs as long as the graphics subsystem is running; it is
  37.     initialized via the /usr/gfx/gfxinit command.  However, a process can
  38.     query or sleep on the counter only when a direct context is current.
  39.     Each of the procedures described below will fail and return an error
  40.     code if the current context is not a direct one.
  41.  
  42.     The counter is an unsigned 32-bit integer.
  43.  
  44. Issues
  45.  
  46.     Should glXWaitVideoSyncSGI return GLX_BAD_VALUE if <remainder> is
  47.     greater than or equal to <divisor>?
  48.  
  49.     Can uint types be used by GLX procedures?
  50.  
  51. New Procedures and Functions
  52.  
  53.     int glXGetVideoSyncSGI(uint *count);
  54.  
  55.     int glXWaitVideoSyncSGI(uint divisor, 
  56.                 uint remainder, 
  57.                 uint *count);
  58.  
  59. New Tokens
  60.  
  61.     None
  62.  
  63. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  64.  
  65.     None
  66.  
  67. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  68.  
  69.     None
  70.  
  71. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations and
  72. the Framebuffer)
  73.  
  74.     None
  75.  
  76. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  77.  
  78.     None
  79.  
  80. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  81.  
  82.     None
  83.  
  84. Additions to the GLX Specification
  85.     
  86.     [Add to Section 3.2.5 of the 1.0 GLX Specification (Synchronization
  87.      Primititives)]
  88.  
  89.     In addition to its current functions, /usr/gfx/gfxinit also initializes
  90.     the video sync counter to zero.  After that time the video sync counter
  91.     is incremented by one at the completion of the display of each full
  92.     frame of video data.  The counter value wraps to zero after it reaches
  93.     its maximum value.  The single video sync counter is shared by all
  94.     GLXContexts.
  95.  
  96.     glXGetVideoSyncSGI returns the value of the video sync counter in
  97.     <count>.  Zero is returned if the call is successful.
  98.  
  99.     glXWaitVideoSyncSGI puts the calling process to sleep until
  100.  
  101.     (C mod D) = R
  102.  
  103.     where C is the video sync counter, D is specified by the <divisor>
  104.     parameter of glXWaitVideoSyncSGI, and R is specified by the <remainder>
  105.     parameter of glXWaitVideoSyncSGI.  glXWaitVideoSyncSGI returns the
  106.     current video sync counter value in <count>.  Zero is returned by
  107.     glXWaitVideoSyncSGI if it is successful.
  108.  
  109.     glXWaitVideoSyncSGI is supported only by direct GLXContexts.
  110.  
  111. Errors
  112.  
  113.     glXGetVideoSyncSGI returns GLX_BAD_CONTEXT if there is no current
  114.     GLXContext.
  115.  
  116.     glXWaitVideoSyncSGI returns GLX_BAD_CONTEXT if the current context is
  117.     not direct, or if there is no current context.
  118.  
  119.     glXWaitVideoSyncSGI returns GLX_BAD_VALUE if parameter <divisor> is less
  120.     than or equal to zero, or if parameter <remainder> is less than zero.
  121.  
  122. New State
  123.  
  124.     Get Value            Get Command        Type    Initial Value
  125.     ---------            -----------        ----    -------------
  126.     [video sync counter]    glXGetVideoSyncSGI    Z+    unknown
  127.  
  128. New Implementation Dependent State
  129.  
  130.     None
  131.